import request from '@/utils/request'

// 创建弹窗广告
export function createPop(data = {}) {
  return request.post('/advert/pop/create', data)
}

// 弹窗广告详情
export function getPopDetail(data = {}) {
  return request.post(`/advert/pop/detail/${data.advertId}`, data)
}

// 创建banner广告
export function createBanner(data = {}) {
  return request.post('/advert/banner/create', data)
}

// banner广告详情
export function getBannerDetail(data = {}) {
  return request.post(`/advert/banner/detail/${data.advertId}`, data)
}

// 广告列表
export function getAdvertList(data = {}) {
  return request.post('/advert/page', data)
}

// 修改上下架状态
export function updateStatus(data = {}) {
  return request.post('/advert/updateStatus', data)
}

// 删除广告
export function deleteAdvert(data = {}) {
  return request.post(`/advert/delete/${data.advertId}`, data)
}

